package com.example.sup.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.example.sup.utils.AbstractObject;
import lombok.Data;

/**
 * 监室表
 * @TableName prison
 */
@TableName(value ="prison")
@Data
public class Prison  extends AbstractObject implements Serializable{
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer prisonId;

    /**
     * 监室名称
     */
    private String prisonName;

    /**
     * 监区关联id
     */
    private Integer prisonDistrictId;

    /**
     * 监室类型
     */
    private Integer prisonTypeId;

    /**
     * 绑定用户id
     */
    private Integer userInfoId;

    /**
     * 强电设备id
     */
    private Integer equipmentStrongId;

    /**
     * 弱电设备id
     */
    private Integer equipmentWeakId;

    /**
     * 
     */
    private Integer unmWare;

    /**
     * 
     */
    private Date createTime;

    /**
     * 
     */
    private String createBy;

    /*查询监室的同时，查询当前监视的温度*/
    @TableField(exist = false)
    private Temperature temperature;
    /*查询监室的同时，查询当前监视的湿度*/
    @TableField(exist = false)
    private Humidity humidity;

    /*查询监室的同时，查询当前监室的设备*/
    @TableField(exist = false)
    private EquipmentInfo equipmentInfo;
    /*查询监室的同时，查询当前监室的所有的告警信息*/
    @TableField(exist = false)
    private List<EventInfo> eventInfoList;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Prison other = (Prison) that;
        return (this.getPrisonId() == null ? other.getPrisonId() == null : this.getPrisonId().equals(other.getPrisonId()))
            && (this.getPrisonName() == null ? other.getPrisonName() == null : this.getPrisonName().equals(other.getPrisonName()))
            && (this.getPrisonDistrictId() == null ? other.getPrisonDistrictId() == null : this.getPrisonDistrictId().equals(other.getPrisonDistrictId()))
            && (this.getPrisonTypeId() == null ? other.getPrisonTypeId() == null : this.getPrisonTypeId().equals(other.getPrisonTypeId()))
            && (this.getUserInfoId() == null ? other.getUserInfoId() == null : this.getUserInfoId().equals(other.getUserInfoId()))
            && (this.getEquipmentStrongId() == null ? other.getEquipmentStrongId() == null : this.getEquipmentStrongId().equals(other.getEquipmentStrongId()))
            && (this.getEquipmentWeakId() == null ? other.getEquipmentWeakId() == null : this.getEquipmentWeakId().equals(other.getEquipmentWeakId()))
            && (this.getUnmWare() == null ? other.getUnmWare() == null : this.getUnmWare().equals(other.getUnmWare()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPrisonId() == null) ? 0 : getPrisonId().hashCode());
        result = prime * result + ((getPrisonName() == null) ? 0 : getPrisonName().hashCode());
        result = prime * result + ((getPrisonDistrictId() == null) ? 0 : getPrisonDistrictId().hashCode());
        result = prime * result + ((getPrisonTypeId() == null) ? 0 : getPrisonTypeId().hashCode());
        result = prime * result + ((getUserInfoId() == null) ? 0 : getUserInfoId().hashCode());
        result = prime * result + ((getEquipmentStrongId() == null) ? 0 : getEquipmentStrongId().hashCode());
        result = prime * result + ((getEquipmentWeakId() == null) ? 0 : getEquipmentWeakId().hashCode());
        result = prime * result + ((getUnmWare() == null) ? 0 : getUnmWare().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", prisonId=").append(prisonId);
        sb.append(", prisonName=").append(prisonName);
        sb.append(", prisonDistrictId=").append(prisonDistrictId);
        sb.append(", prisonTypeId=").append(prisonTypeId);
        sb.append(", userInfoId=").append(userInfoId);
        sb.append(", equipmentStrongId=").append(equipmentStrongId);
        sb.append(", equipmentWeakId=").append(equipmentWeakId);
        sb.append(", unmWare=").append(unmWare);
        sb.append(", createTime=").append(createTime);
        sb.append(", createBy=").append(createBy);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append(", temperature=").append(temperature);
        sb.append(", humidity=").append(humidity);
        sb.append("]");
        return sb.toString();
    }
}